<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<%@ taglib prefix="spring" uri="http://www.springframework.org/tags"%>


<html>
<head>
</head>

<body>
    <c:if test="${not empty forum}">
    <h3 class="tag-head" style="clear:both;">${forum.subject}</h3>
    <c:if test="${not empty topics.content}">
    <c:forEach var="topic" items="${topics.content}">
    <div class="entry" style="clear:both;">
        <h1><a href="<spring:url value="/topics/${topic.id}"/>">${topic.subject}</a></h1>
        <c:if test="${not empty topic.tags}">
        <dl class="tags">
            <dt><spring:message code="message.categories"/></dt>
            <c:forEach var="tag" items="${topic.tags}">
            <dd><a id="${tag.id}" name="${tag.name}" href="<spring:url value="/tags/${tag.id}"/>">${tag.name}</a>&nbsp</dd>
            </c:forEach>
        </dl>
        </c:if>
        <p>
        ${topic.content}
        </p>
        <ul class="info link-col">
            <li class="author">
                <span>
                &nbsp;
                </span>
                <spring:message code="message.author"/> <strong><a class="editorlink" href="#">${topic.poster.name}</a></strong>
                <span>
                &nbsp;
                </span>
                <spring:message code="message.edited_at"/> <fmt:formatDate value="${topic.editdate.time}" type="both" pattern="yyyy-MM-dd HH:mm:ss"/>
            </li>
            <li class="comments">
                <a href="<spring:url value="/topics/${topic.id}/reply"/>">
                <span>
                &nbsp;
                </span>
                <spring:message code="message.reply"/></a>
            </li>
        </ul>
    </div>
    </c:forEach>
    </c:if>
    </c:if>
</body>
</html>